<template>
	<view class="History">
		<view v-for="(item,index) in Historylist" class="Historybox">
			<view class="HistoryboxTitle"><span>{{item.activityTitle}}</span>
				<image class="Historyboximage" src="../../static/images/home/箭头 (1) 拷贝 2@2x.png" mode=""></image>
			</view>
			<view class="HistoryboxCompany">{{item.subInsureOrganName}}</view>
			<view class="HistoryboxName">家长姓名:{{item.parentRealName}}</view>
			<view class="HistoryboxTime">提交时间:{{item.createTime|timeFormat}}</view>
			<navigator
				:url="'/pages/myhome/historyInfo?activityId={{item.activityId}}&insurePlanCode={{item.insurePlanCode}}&deptName={{item.deptName}}&subInsureOrganName={{item.subInsureOrganName}}'"
				hover-class="navigator-hover">
				<button class="HistoryboxButton">查看详情</button>
			</navigator>
		</view>
	</view>
</template>

<script>
	import {
		wxJoinActivityHistory,
		historyDetails,
		detailsList
	} from '../../api/login.js'

	export default {
		data() {
			return {
				Historylist: []
			}
		},
		mounted() {
			this.int()
		},
		methods: {
			int() {
				var data = {}
				// 研学活动登记历史分页列表
				wxJoinActivityHistory(data).then(res => {
					this.Historylist = res.rows
					// parentRealName => 家长姓名
					// createTime => 提交时间 截取日期就可以
					// activityTitle =>对应峰光研学 另外需要传递给详情页面展示
					// subInsureOrganName  =>对应成都市峰光文化旅游有限公司 另外需要传递个详情页面展示
					// activityId => 对应详情接口需要传递的belongId参数
					console.log('111', res)
				})
			}
		}
	}
</script>

<style>
	.History {
		width: 100%;
		height: 100vh;
		overflow: auto;
		padding: 3% 0;
		background: #F5F8FA;
	}

	.Historybox {
		width: 92%;
		/* height: 280rpx; */
		background: #fff;
		padding: 4%;
		margin-bottom: 15rpx;
		position: relative;
		overflow: hidden;
	}

	.HistoryboxTitle {
		font-weight: bold;
		font-size: 31rpx;
		color: #000;
		line-height: 83rpx;
		height: 83rpx;
		overflow: hidden;
		position: relative;
	}

	.HistoryboxCompany {
		font-size: 25rpx;
		color: #000000;
		line-height: 50rpx;
	}

	.HistoryboxName {
		font-size: 25rpx;
		color: #000000;
		line-height: 50rpx;
	}

	.HistoryboxTime {
		font-size: 25rpx;
		color: #000000;
		line-height: 50rpx;
	}

	.HistoryboxButton {
		width: 152rpx;
		height: 55rpx;
		border-radius: 28rpx;
		font-size: 24rpx;
		color: #FFFFFF;
		line-height: 55rpx;
		font-weight: bold;
		background-image: linear-gradient(to right, #449EEC 0%, #005bea 100%);
		position: absolute;
		right: 3%;
		bottom: 5%;
	}

	.Historyboximage {
		width: 15rpx;
		height: 26rpx;
		position: absolute;
		top: 28rpx;
		left: 130rpx;
	}
</style>